package com.sc.byahi.open.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.SpanElement;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.History;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;

public class Stage extends Composite {

	private static StageUiBinder uiBinder = GWT.create(StageUiBinder.class);

	interface StageUiBinder extends UiBinder<Widget, Stage> {
	}

	@UiField
	SpanElement heading;
	@UiField
	SpanElement description;

	public Stage() {
		initWidget(uiBinder.createAndBindUi(this));

	}

	public void setText() {
		String token = History.getToken();
		if ("home".equals(token)) {
			this.heading.setInnerText("Welcome to Byahi");
			this.description.setInnerText("A simple, neat and clean website for searching your life partner.");
		}
	}
}
